/**
 * Created by zhanglihe on 15/11/3.
 */
require.config(require_config);

define([
    'jquery',
    'common',
    'ready',
    'template',
    'model',
    'dialog',
    'datepicker'
], function ($, common, ready, template, Model, dialog, datepicker) {

    var index = function () {
        this.init();
    };

    index.prototype = {
        init: function () {
            var _this = this;

            this.fetch();
        },
        fetch: function () {
            var that = this;
            var id = getUrlPath(3);
            this.model = new Model({
                url: _global.url.api + 'apply_upload/' + id,
                data: {},
                render: function () {
                    $('#main-view').html(template('edit-tpl', this.data));
                }
            });
            this.model.fetch();
        }
    };

    new index();

});